package com.woniuxy.dao;

import com.woniuxy.entity.ExamMenu;
import com.woniuxy.entity.ExamPublishexam;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

public interface ExamMenuDao {
    //查询所有菜单
    public List<ExamMenu> findAll();
    public List<ExamMenu> findAll(int currentPage, int pageSize);
    //软删除,数据库操作是修改is_deleted
    public int deleteOne(ExamMenu examMenu);
    //修改题库
    public int updateOne(ExamMenu examMenu);

    public int addOne(ExamMenu examMenu);
    public int addOneNoFid(ExamMenu examMenu);

    List<ExamMenu> findBySearch(String name);

    List<ExamMenu> clcAdd();
    //按名字查找
    ExamMenu findByName(String name);

    //按fid 不为空查找
    List<ExamMenu> findCategory();
    ExamMenu findById(int id);

    public ArrayList<String> findFid();
    //按名字和fid查找
    ExamMenu findByNameAndFid(ExamMenu examMenu);
    //查找当前登录学生的所有考试
    List<ExamPublishexam> findAllpaper(@Param("eInformationId") int eInformationId);
    //按搜索查找当前登录学生的所有考试
    //List<ExamPublishexam> findAllpaperBysearch(@Param("eInformationId") int userid,@Param("searchName") String searchName);
}
